

function main( json, ui, hh ) {
	
	/*
	if( null == json ) throw new Exception("param json is null!");
	
	return createEvent( json );
	*/
	return createEventTest();
	
}

function createEvent( p ) {
	
	 var a = new EventEntity();
	 
     p.copyTo( a );
     	  
	 BOLEntityManager.createEvent( a );
	 
	 return a; 
}

function createEventTest() {
	
	 var a = new EventEntity();
	 
	 a.from = new java.util.Date();
	 a.to = new java.util.Date();
	 a.to.setHours( a.from.getHours() + 1 ); 
     
	 a.userId = "test1";
	 a.address = "via col vento, 1";
	 
	 //p.copyTo( a );
    	  
	 BOLEntityManager.createEvent( a );
	 
	 return a; 
}
